package com.prince.web.service;

import java.util.Map;

import com.prince.model.Limits;
import com.prince.model.User;

public interface LimitsService {

	/**
	 * 根据角色查菜单
	 * 
	 * @return
	 */
	Map<String, Object> findLimitsByUserId(User user);


	/**
	 * 根据parentCode 查询
	 * 
	 * @return
	 */
	Map<String, Object> findLimitsByParentCode(Limits limits);

	/**
	 * 添加权限
	 * 
	 * @param limits
	 * @return
	 */
	Map<String, Object> addLimits(Limits limits, User user);

	/**
	 * 根据权限id查询
	 * 
	 * @param id
	 * @return
	 */
	Map<String, Object> findLimitsById(Integer id);

	/**
	 * 更新权限
	 * 
	 * @param limits
	 * @return
	 */
	Map<String, Object> updateLimits(Limits limits);

	/**
	 * 通过userId、parentCode 查询 按钮权限
	 * @param params
	 * @return
	 */
	Map<String, Object> selectLimitsByUserIdAndParentCode(Map<String, Object> params, User user);

	/**页面 js 过滤
	 * @param url
	 * @param user
	 * @return
	 */
	boolean limitsFilter(String url, User user);

	/**
	 * 删除权限
	 * @param limits
	 * @return
	 */
	Map<String, Object> delLimits(Limits limits);
	/**
	 * 查询limits
	 * @return
	 */
	Map<String, Object> findLimitsAll(User user);

	Map<String, Object> findCodeByAddr(Limits limits);

}
